class CreateFeeds < ActiveRecord::Migration
  def self.up
    create_table :feeds do |t|
      t.column :updated_at,      :datetime
      t.column :update_interval, :integer, :default => 3600
      t.column :status,          :integer
      t.column :kind,            :string
      t.column :name,            :string
      t.column :url,             :string
    end
    create_table :feeds_links, :id => false do |t|
      t.column :source_id,      :integer, :null => false
      t.column :destination_id, :integer, :null => false
    end
  end

  def self.down
    drop_table :feeds
    drop_table :feeds_links
  end
end
